package com.hw.paltfrom.controller.casemain;

import com.hw.paltfrom.pack.ResponseResult;
import com.hw.paltfrom.rescode.HWSystemCode;
import com.hw.paltfrom.service.casemain.CityCasemainServer;
import com.hw.paltfrom.utils.VerifyUtil;
import com.hw.paltfrom.vo.CaseMainCityVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 执法监管(市级)
 * 梁天
 * 2019年11月7日
 */
@RestController
@RequestMapping(value = "/CityCasemainController")
public class CityCasemainController {

    @Autowired
    CityCasemainServer cityCasemainServer;


    /**
     * 列表查询
     * @param vo
     * @return
     */
    @RequestMapping(value = "/queryList")
    public Map<String, Object> queryList(CaseMainCityVO vo) {
        Boolean flag = VerifyUtil.verifyParams(vo);
        if (!flag) {
            return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
        }
        return cityCasemainServer.query(vo);
    }


    /**
     * 督导
     * @param vo
     * @return
     */
    @RequestMapping(value = "/superVision")
    public Map<String, Object> superVision(CaseMainCityVO vo) {
        Boolean flag = VerifyUtil.verifyParams(vo);
        if (!flag) {
            return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
        }
        return cityCasemainServer.superVision(vo);
    }


    /**
     * 查询当前任务所属站点和区县
     * @param vo
     * @return
     */
    @RequestMapping(value = "/querysqStation")
    public Map<String, Object> querysqStation(CaseMainCityVO vo) {
        Boolean flag = VerifyUtil.verifyParams(vo);
        if (!flag) {
            return ResponseResult.fail(HWSystemCode.PARAMS_ERROR);
        }
        return cityCasemainServer.querysqStation(vo);
    }


}
